Method and electronic device for displaying a menu in association with an application icon

ABSTRACT

An electronic device having a touch-sensitive surface and a processing method for the electronic device. When a pressing operation on an application icon is detected on the touch-sensitive surface, a menu including m operation options is displayed on a display screen of the electronic device so that a user quickly performs different operations on an application program. The m operation options are determined based on at least one of: a quantity of times that an operation option is tapped, a time at which an operation option is taped, a location of the electronic device when an operation option is tapped, unread information in an application corresponding to the application icon, data obtained before the application is suspended, data obtained when the application runs in the background, or a communication object in the application.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a National Stage of International Application No.PCT/CN2017/088504, filed on Jun. 15, 2017, which is hereby incorporatedby reference in its entirety.

TECHNICAL FIELD

Embodiments of this application relate to the communications field, andin particular, to an electronic device having a display screen and aplurality of application programs (which are also referred to asapplications or apps below) and a processing method for the electronicdevice.

BACKGROUND

In the prior art, a pressure touchscreen of an electronic device candetect pressing force of a user, and make different responses to a lightpress, a light tap, and a heavy press with different pressing force.When the user presses hard (heavily presses) an application icon, atranslucent menu pops up on the electronic device. The menu includessome operation options of an application. The user selects one of theoperation options, to use a function corresponding to the option. Forexample, the user heavily presses a “camera” icon on a mobile phone, andoperation options included in a pop-up menu include photographing,slow-motion video recording, video recording, and selfie capturing.

However, the operation options included in the pop-up menu are alloperation options predefined by a system, and cannot be changed based onan actual requirement of the user. Therefore, it is still inconvenientto use the operation options, affecting user experience.

SUMMARY

This application provides an electronic device and a processing methodfor the electronic device. When a user heavily presses an applicationicon, a menu including at least one operation option is determined anddisplayed based on at least one of: a quantity of times that anoperation option is tapped, a time at which an operation option istapped, a location of the electronic device when an operation option istapped, unread information in an application, data obtained before anapplication is suspended, data obtained when an application runs in thebackground, and a communication object in an application, so that theoperation option presented in the menu better meets a habit of the user.This improves user experience.

The term “electronic device” mentioned below in this application is aportable communications device that may include another function, suchas a personal digital assistant (PDA) function and/or a portablemultimedia player (PMP) function. The portable communications device is,for example, an electronic paper, an ebook, a TV, a computer, anin-vehicle display, a tablet computer, a smartphone, or a smartwatch. Anexample implementation of the portable electronic device includes, butis not limited to, a portable electronic device on which iOS®, Android®,Windows Phone, or another operating system is installed. Alternatively,another portable electronic device may be used, such as a laptopcomputer or a tablet computer having a touch-sensitive surface (such asa touchscreen display and/or a touchpad). It should be furtherunderstood that, in some embodiments, the electronic device is not aportable communications device, but a desktop computer having atouch-sensitive surface (such as a touchscreen display and/or atouchpad).

The electronic device usually supports a plurality of applicationprograms, such as one or more of the following: a drawing applicationprogram, a presence application program, a word processing applicationprogram, a web page creation application program, a map applicationprogram, an electronic table application program, a game applicationprogram, a phone application program, a video conference applicationprogram, an email application program, an instant message applicationprogram, an exercise support application program, a photographmanagement application program, a digital camera application program, adigital video camera application program, a network browsing applicationprogram, a digital music player application program, and/or a digitalvideo player application program.

Various application programs that may be executed on the electronicdevice may use at least one shared physical interface, such as thetouch-sensitive surface. One or more functions of the touch-sensitivesurface and corresponding information displayed on the electronic devicemay be adjusted and/or changed from one application program to anotherapplication program, or may be adjusted and/or changed within acorresponding application program In this way, the touch-sensitivesurface of the electronic device may support the various applicationprograms by using a user interface that is visual and clear to the user.

According to a first aspect, an embodiment of this application providesa method. The method is applied to an electronic device having a displayscreen and a plurality of applications. The display screen includes atouch-sensitive surface. The method includes: displaying at least oneapplication icon on a home screen page of the electronic device;detecting, on the touch-sensitive surface, a first heavy pressingoperation performed on a first application icon, where the firstapplication icon is one of the at least one application icon, and thefirst application icon corresponds to a first application; displaying afirst menu in response to the first heavy pressing operation, where thefirst menu includes at least one first operation option, the firstoperation option is an operation option provided in the firstapplication, and the first operation option can be selected to start thefirst application and to enable a function corresponding to the selectedfirst operation option; returning, by the electronic device, to the homescreen page; detecting, on the touch-sensitive surface, a second heavypressing operation performed on the first application icon; displaying asecond menu in response to the second heavy pressing operation, wherethe second menu is different from the first menu, and the second menuincludes at least one second operation option; and automaticallyadjusting, by the electronic device, the second operation optionincluded in the second menu, where the second operation option is anoperation option provided in the first application, and the secondoperation option can be selected to start the first application and toenable a function corresponding to the selected second operation option.Therefore, an operation option displayed on the electronic device afteran application icon is heavily pressed can be changed.

Further, the second menu is different from the first menu, and at leastone of the following cases is included: The function corresponding tothe first operation option is different from the function correspondingto the second operation option; a quantity of first operation options isdifferent from a quantity of second operation options; and a location ofan operation option corresponding to a same function in the first menuis different from that in the second menu. In the two heavy pressingoperations, the functions corresponding to the operation optionsdisplayed on the electronic device may be different, the quantities ofoperation options displayed on the electronic device may be different,and the locations of the operation options that correspond to the samefunction and that are in the menus may also be different.

Optionally, the method further includes: automatically adjusting, by theelectronic device, a location of the second operation option in thesecond menu based on a quantity of times that the second operationoption is tapped. Therefore, an operation option that is most frequentlyused by a user may be arranged on the top of a menu based on a usagehabit of the user, and the user does not need to open a functionalinterface of an application level by level, saving time for the user.

Optionally, the method further includes: automatically adjusting, by theelectronic device based on a time at which the second heavy pressingoperation occurs, the second operation option included in the secondmenu. Therefore, an operation option that is most frequently used by theuser in a time period may be arranged on the top of a menu based onusage habits of the user in different time periods.

Optionally, the method further includes: automatically adjusting, by theelectronic device based on a location of the electronic device when thesecond heavy pressing operation occurs, the second operation optionincluded in the second menu. Therefore, an operation option that is mostfrequently used by the user at a location or in a place may bepresented, based on usage habits of the user at different locations orin different places, at a location that is more easily seen and tappedby the user.

Optionally, the method further includes: when the first application is aphone application, automatically adjusting, by the electronic devicebased on a missed call in the first application, the second operationoption included in the second menu, where the function corresponding tothe second operation option is dialing a phone number of the missedcall.

Optionally, the method further includes: automatically adjusting, by theelectronic device based on unread information in the first application,the second operation option included in the second menu, where thefunction corresponding to the second operation option includes at leastone of the following: viewing the unread information, replying to theunread information, and dialing a phone number from which the unreadinformation is sent. The user may conveniently dial back for the missedcall, reply to an unread short message service message, view an unreadnotification message, reply to an unread WeChat message, and the like.

The unread information includes an unread short message service message,an unread instant messaging message, or an unread notification message.

Optionally, the method further includes: automatically adjusting, by theelectronic device based on data obtained before the first application issuspended, the second operation option included in the second menu.

Optionally, the method further includes: automatically adjusting, by theelectronic device based on data obtained when the first application runsin the background, the second operation option included in the secondmenu.

Optionally, the method further includes: when the first application hasat least one communication object, automatically adjusting, by theelectronic device based on a time for communicating with the at leastone communication object, the second operation option included in thesecond menu. The user may conveniently communicate with a communicationobject with which the user comes into contact recently.

The communication object includes at least one of the following: a phonenumber, an application account number, a mail address, a useridentifier, and a user name.

Optionally, the method further includes that at least one secondoperation option is an operation option preset by a system. Anapplication-related operation option may be preset before a delivery ofthe electronic device, and the operation option may be an operationoption conforming to a habit of most users, or an operation optionrelated to an important application function.

Optionally, the second operation options are arranged from top to bottomin descending order of quantities of times of communicating with thecommunication object.

Optionally, the second operation options are arranged from top to bottombased on times for communicating with the communication object from lateto early. In other words, a shorter time period between the time forcommunicating with the communication object and a current momentindicates an upper location at which the second operation optionassociated with the communication object is arranged.

Optionally, the second operation option includes information about afamily member or information about a particular contact. The user mayconveniently communicate with the family member and the particularcontact, for example, through making a call, sending a short messageservice message, transferring, or sending a mail.

Optionally, the second operation option includes an operation optionthat may be executed in different application functional interfaces ofthe first application. When the operation option includes an executableoption in a main interface of the first application and an executableoption in a sub-interface of the first application, the user does notneed to open the functional interfaces of the first application level bylevel, reducing operation steps.

Optionally, the second operation option includes all operation optionsthat may be executed in an application functional interface in the firstapplication. While a usage habit of the user is considered, apossibility that the user needs to use another operation option is alsoconsidered.

According to a second aspect, an embodiment of the present inventionprovides an electronic device. The electronic device has a function forimplementing each method in the first aspect. The function may beimplemented by using hardware, or may be implemented by using hardwareexecuting corresponding software. The hardware or software includes oneor more modules corresponding to the foregoing function.

According to a third aspect, an embodiment of the present inventionprovides an electronic device, including a processor, a memory, adisplay screen, and the like. The memory is configured to store data.The display screen includes a touch-sensitive surface, and is configuredto: display various types of information and receive an instruction thatis entered by a user by using the touch-sensitive surface. The processoris configured to perform each method in the first aspect.

An embodiment of the present invention further provides a computerreadable storage medium. The computer readable storage medium stores aninstruction. When the instruction runs on a computer, the computer isenabled to perform each method in the first aspect.

An embodiment of the present invention further provides a computerprogram product including an instruction. When the computer programproduct runs on a computer, the computer is enabled to perform eachmethod in the first aspect.

An embodiment of the present invention further provides a graphical userinterface on an electronic device. The electronic device includes amemory, a plurality of applications, and one or more processorsconfigured to execute one or more programs stored in the memory. Thegraphical user interface includes a user interface displayed based onthe method in any one of the first aspect or the possibleimplementations of the first aspect.

Based on the embodiments of the present invention, a problem that a menupopping up after a heavy press cannot be changed based on an actualrequirement of a user can be resolved. In the embodiments of the presentinvention, the menu displayed in response to the heavy press of the usercan be dynamically adjusted, and an arrangement manner of an operationoption included in the menu better conforms to a usage habit of theuser.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of an electronic device according to anembodiment of this application:

FIG. 2 is a processing method for an electronic device according to anembodiment of this application;

FIG. 3 is a flowchart for determining an operation option and displayingthe operation option in a form of a menu according to an embodiment ofthis application;

FIG. 4(a) to FIG. 4(f) are schematic diagrams of an operation optiondisplayed when a map application icon is heavily pressed according to anembodiment of this application;

FIG. 5A and FIG. 5B are a schematic flowchart for determining anddisplaying an operation option in a map application according to anembodiment of this application;

FIG. 6(a) and FIG. 6(b) are schematic diagrams of an operation optiondisplayed when a phone application icon is heavily pressed according toan embodiment of this application; and

FIG. 7(a) and FIG. 7(b) are schematic diagrams of an operation optiondisplayed when a short message service message application icon isheavily pressed according to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

The following describes the embodiments of this application withreference to accompanying drawings.

The ordinal numbers such as “first” and “second” mentioned in theembodiments of this application shall only serve the purpose ofdifferentiation unless the numbers definitely indicate a sequence basedon a context.

FIG. 1 is a block diagram of an electronic device 100 according to anembodiment of this application.

As shown in FIG. 1, the electronic device 100 includes a wirelesscommunications unit 110, an A/V (audio/video) input unit 120, a userinput unit 130, a sensing unit 140, an output unit 150, a memory 160, aninterface unit 170, a processor 180, a power unit 190, and the like.FIG. 1 shows the electronic device 100 having the various components.However, it should be understood that implementation of the electronicdevice 100 not necessarily requires all the shown components. Theelectronic device 100 may be implemented by using more or fewercomponents.

The following explains each of the foregoing components.

The wireless communications unit 110 usually includes one or morecomponents. The component allows radio communication between theelectronic device 100 and a wireless communications system or a networkin which the electronic device is located. For example, the wirelesscommunications unit 110 may include at least one of a broadcastreceiving module 111, a mobile communications module 112, a wirelessInternet module 113, a short range communications module 114, or alocation positioning module 115.

The broadcast receiving module 111 receives a broadcast signal and/orbroadcast-related information from an external broadcast managementserver by using a broadcast channel. The broadcast channel includes asatellite channel and/or a terrestrial channel. The broadcast managementserver is a server configured to generate and transfer the broadcastsignal and/or the broadcast-related information, or a server configuredto receive the generated broadcast signal and/or the generatedbroadcast-related information and transfer the generated broadcastsignal and/or the generated broadcast-related information to theelectronic device. The broadcast signal and/or the broadcast-relatedinformation that are/is received by the broadcast receiving module 111may be stored in the memory 160.

The broadcast signal may include a TV broadcast signal, a radiobroadcast signal, or a data broadcast signal, and may further include abroadcast signal obtained by combining the data broadcast signal withthe TV broadcast signal or the radio broadcast signal.

An example of the broadcast-related information may include informationrelated to a broadcast channel, a broadcast program, or a broadcastservice provider. The broadcast-related information may be provided byusing a mobile communications network. In this case, thebroadcast-related information may be received by using the mobilecommunications module 112.

The broadcast-related information may exist in various forms. Forexample, the broadcast-related information may exist in a form of anelectronic program guide (EPG) of digital multimedia broadcasting (DMB),or in a form of an electronic service guide (ESG) of digital videobroadcasting-handheld (DVB-H).

The broadcast receiving module 111 receives the broadcast signal byusing various broadcast systems, and may receive the data broadcastsignal by using a digital broadcast system. The broadcast receivingmodule 111 may be properly configured to receive the broadcast signalfrom another broadcast system and the foregoing digital broadcastsystem.

The mobile communications module 112 transfers, on the mobilecommunications network, a radio signal to at least a base station, anexternal terminal, or a server; and receives, on the mobilecommunications network, a radio signal from at least the base station,the external terminal, or the server. The radio signal may include avoice call signal, a video call signal, or various types of data signalscorresponding to text/multimedia message transmission and reception.

The wireless Internet module 113 is a module for wireless Internetaccess. The wireless Internet module 113 may be internally or externallycoupled to the electronic device 100. A wireless Internet technology mayinclude a WLAN, Wi-Fi, wireless broadband, Worldwide Interoperabilityfor Microwave Access, and high speed downlink packet access.

The short range communications module 114 is a module for short rangecommunication. A used short range communications technology may includeBluetooth, radio frequency identification (RFID), the Infrared DataAssociation (IrDA), ultra-wideband (UWB), or ZigBee.

The location positioning module 115 is a module configured to obtain alocation of the electronic device 100 through identification or inanother manner. The location positioning module 115 may be a GPS (GlobalPositioning System) module. The GPS module 115 may calculate locationand time information by using three satellites, and correct thecalculated location and time information by using another satellite. Inaddition, the GPS module 115 continuously calculates a current locationin real time, and calculates speed information by using locationinformation.

The A/V input unit 120 is configured to receive an audio signal or avideo signal. The A/V input unit 120 may include a camera 121 and amicrophone 122. The camera 121 processes, in a video capture mode or inan image capture mode, a video obtained by using an image captureapparatus or image data of a still image. A processed image frame may bedisplayed on the following display screen 151.

The image frame processed by using the camera 121 may be stored in thefollowing memory 160 or transferred by using the wireless communicationsunit 110. Two or more cameras 121 may be provided based on aconfiguration of the electronic device.

The microphone 122 may receive a sound (an audio signal) when theelectronic device 100X) is in a particular mode (such as in a phone callmode, in a recording mode, or in a speech recognition mode). The audiosignal is processed to obtain digital data. The digital data may beoutput and converted into a format that can be sent to a mobilecommunications base station in a phone call mode by using the mobilecommunications module 112. The microphone 122 may implement variousnoise cancellation (or suppression) algorithms to cancel (or suppress)noise or interference generated in a process of receiving andtransferring the audio signal.

The user input unit 130 may generate input data based on a commandentered by a user, to control various operations of the electronicdevice 100. The user input unit 130 allows the user to enter varioustypes of information, and may include a keyboard, a dome switch (domeswitch), a touchpad (such as a touch sensitive component, where thetouchpad detects a change in an aspect such as resistance, pressure, orcapacitance when the touchpad is touched), a jog wheel (jog wheel), ajog switch (jog switch), and the like.

The sensing unit 140 detects, for example, a current situation (or astatus) of an on or off state of the electronic device 100, a locationof the electronic device 100, existence or inexistence of a touchperformed by a user on the electronic device 100, an orientation of theelectronic device 100, a direction of the electronic device 100, andacceleration and deceleration movement of the electronic device 100; andgenerates a command or a signal used to control an operation of theelectronic device 100. For example, when the electronic device 100 isimplemented as a smartphone, the sensing unit 140 (such as a gravitysensor) may sense a landscape mode or a vertical mode of the smartphone.In addition, the sensing unit 140 can detect whether the power unit 190supplies power.

The output unit 150 is configured to provide output (such as an audiosignal, a video signal, an alarm signal, or a vibration signal) in avisual manner, an auditory manner, and/or a tactile manner. The outputunit 150 may include the display screen 151, an audio output module 152,an alarm unit 153, a tactile module 154, and the like.

The display screen 151 may display information processed on theelectronic device 100. For example, when the electronic device 100 is ina phone call mode, the display screen 151 may display a call-relateduser interface (UI) or a call-related graphical user interface (GUI).

When the display screen 151 and the touchpad are overlapped in alayering manner to form a touchscreen, the display screen 151 includes atouch-sensitive surface. Therefore, the display screen 151 may serve asan input apparatus and an output apparatus. The display screen 151 mayinclude at least one of a liquid crystal display (LCD), an organiclight-emitting diode (OLED) display, a three-dimensional (3D) display,or an electronic ink display.

Some of these displays may be configured as transparent, so that theoutside can be seen through the displays. The displays may be referredto as transparent displays. A representative example of the transparentdisplays may include a transparent organic light-emitting diode (TOLED)and the like. A rear surface of the display screen 151 may betranslucent. Based on such a configuration, the user can see an objecton a rear side of a body through the display screen 151 of the body.

Based on a configuration status of the electronic device 100, for aquantity, the display screen 151 may be implemented by using two or moredisplay screens. For example, a plurality of display screens may beintegrally or independently disposed on one surface, or disposed ondifferent surfaces.

Herein, if there is a layered structure between the display screen 151and a touch-sensitive sensor (which is also referred to as a “touchsensor” below), the structure may be referred to as a touchscreen or adisplay screen having a touch-sensitive surface. The display screen 151(which is also referred to as a “touchscreen” 151 below) may serve as aninput apparatus other than an output apparatus. The touch sensor may beimplemented as a touch film, a touch sheet, a touchpad, or the like.

The touch sensor may be configured to convert, into an electrical inputsignal, pressure imposed on a particular part of the display screen 151or capacitance occurring at a particular part of the display screen 151.In addition, the touch sensor may be configured to: not only sense atouched location and a touched area, but also sense touch pressure, andmake different responses to a light press, a light tap, and a heavypress with different pressing force. For the light press, the light tap,and the heavy press described in this application, refer to functions of“Force Touch” and “3D Touch” of Apple Inc. For details, refer tohttps://en.wikipedia.org/wiki/Force_Touch#3D_Touch. The light press, thelight tap, and the heavy press are technologies implemented on apressure touchscreen. The heavy press is pressing a touch-sensitivesurface by using greater force than the light press. A shortcutoperation option supported by an application may pop up by heavilypressing an icon of the application on a desktop (a home screen page) ofa mobile phone. For example, a menu including three shortcut operationoptions including “Create an alarm”, “Start timing by using astopwatch”, and “Start timing” may pop up by heavily pressing “Clock”.

When touch input is sensed by using the touch sensor, a correspondingsignal is transferred to a touch processor (not shown in the figure).The touch processor processes the received signal, and then transferscorresponding data to the processor 180. Therefore, the processor 180may determine a specific touched area of the display screen 151 and atouch pressure value.

Still referring to FIG. 1, a proximity sensor 141 may be disposed in aninternal area of the electronic device covered by the touchscreen, ornear the touchscreen. The proximity sensor 141 may be set to an exampleof the sensing unit 140. The proximity sensor 141 indicates a sensorconfigured to use an electromagnetic field or infrared to sense, withoutmechanical contact, whether the electronic device is proximate to anobject on a to-be-sensed surface or close to an object disposed on ato-be-sensed surface. Compared with a touch sensor, the proximity sensor141 has a longer life span and enhanced practicability.

The audio output module 152 may output, in a mode such as a call signalreceiving mode, a call mode, a recording mode, a voice recognition mode,or a broadcast receiving mode, audio data received from the wirelesscommunications unit 110 or stored in the memory 160. In addition, theaudio output module 152 may provide audio output (such as a call signalreceiving sound or a message receiving sound) related to a particularfunction executed on the electronic device 100. The audio output module152 may include a receiver, a speaker, a buzzer, and the like.

The alarm unit 153 outputs a signal used to provide a notification aboutoccurrence of an event of the electronic device 100. The event generatedon the electronic device 100 may include call signal reception, messagereception, keyboard signal input, touch input, and the like. The alarmunit 153 not only may output a video signal or an audio signal, but alsomay output another type of signal, such as a signal used to provide anotification about occurrence of an event in a vibration manner. Herein,the video signal or the audio signal may be output by using the displayscreen 151 or the audio output module 152. Therefore, the display screen151 or the audio output module 152 may be classified as a part of thealarm unit 153.

The tactile module 154 generates various tactile effects that can besensed by the user. A representative example of a tactile effectgenerated by using the tactile module 154 is a vibration. Strength and amode of the tactile module 154 may be controlled. For example, differentvibrations may be output in a combination manner or may be outputsequentially.

In addition to the vibration, the tactile module 154 may furthergenerate various types of other tactile effects such as a stimuluseffect (for example, a pin arrangement structure that vertically movesrelative to contact skin, spray force obtained when air passes through aspray outlet and suction force obtained when air passes through asuction inlet, contact on skin, electrode contact, or electrostaticforce), and present a thermal feeling effect again by using a componentthat can absorb heat or emit heat.

The tactile module 154 may be implemented to allow the user to sense atactile effect by using a finger or a muscle of an arm, and transmit thetactile effect through direct contact. Two or more tactile modules 154may be provided based on a configuration of the electronic device 100.

The memory 160 may store a software program that is executed by theprocessor 180 and that processes and controls an operation, or maytemporarily store input or output data (such as a phone book, a message,a still image, or a video). The memory may further store data related tovarious modes of a vibration and an audio signal that are output when atouch is input to the touchscreen.

The memory 160 may be implemented by using any type of proper storagemedium. The storage medium includes a flash memory type, a hard disktype, a micro multimedia card, a memory card (such as an SD or a DXmemory), a random access memory (RAM), a static random access memory(SRAM), a read-only memory (ROM), an electrically erasable programmableread-only memory (EEPROM), a programmable read-only memory (PROM), amagnetic memory, a magnetic disk, an optical disc, and the like. Inaddition, the electronic device 100 may perform an operation related toa network storage apparatus that is on the Internet and that executes astorage function of the memory 160.

The interface unit 170 serves as a connection channel between theelectronic device 100 and an external device. The interface unit 170 mayreceive data from the external device. Power may be supplied to theelectronic device 100 by using the interface unit 170, and then thepower is transferred to each component in the electronic device 100. Theinterface unit 170 may enable the data to be transmitted from the insideof the electronic device 100 to the external device. The interface unit170 may include a wired/wireless headset port, an external charger port,a wired/wireless data port, a memory card port, a port configured tocouple to an apparatus having an identification module, an audioinput/output (I/O) port, a video input/output (I/O) port, and/or aheadset port.

The identification module may be a chip or a card storing variousinformation required to authenticate usage permission for the electronicdevice 100. The identification module may include a user identity module(UIM), a subscriber identity module (SIM), a universal subscriberidentity module (USIM), and/or the like. In addition, the apparatus(which is referred to as an “identification apparatus” below) having theidentification module may be implemented by using a smartcard.Therefore, the identification apparatus may be coupled to the electronicdevice 100 by using a port.

The interface unit 170 may be used as a path for supplying power from anexternal expansion device to the electronic device 100 when theelectronic device 100 is connected to the external expansion device, ormay be used as a path for transmitting, to the electronic device 100,various command signals entered by the user from an expansion device.The various command signals or the power entered from the expansiondevice may be used as a signal operation performed to identify that theelectronic device is accurately installed on the expansion device.

The processor 180 usually controls an integral operation of theelectronic device 100. For example, the processor 180 performs controland processing that are associated with a phone call, datacommunication, a video call, and the like. The processor 180 may includea multimedia module 182. The multimedia module 182 is configured topresent multimedia data again. The multimedia module 182 may beconfigured as a part of the processor 180 or an independent component.

The processor 180 may sense a specific touched area of the displayscreen 151 and a touch pressure value. Touches are classified as a lightpress, a light tap, and a heavy press based on different touch pressurevalues. When the processor 180 senses that the display screen 151 isheavily pressed, an application associated with an application icon in aheavily pressed area is determined, an operation option is generated foran operation of the application, and the operation option is displayedon the display screen 151 by using a menu.

The processor 180 may also perform mode identification processing, sothat writing input or drawing input on a touchscreen 151 is identifiedas a text or an image.

In addition, the processor 180 may execute a lock status when a statusof the electronic device 100 meets a preset condition, to limit the userin entering a control command for the application. In addition, theprocessor 180 may control, based on touch input sensed on thetouchscreen 151 of the electronic device 100 in a lock status, a lockimage displayed in the lock status.

The power unit 190 receives an external power supply and an internalpower supply under control of the processor 180, and supplies properpower required to operate a corresponding part and a correspondingcomponent.

Various implementations described in this specification may beimplemented in a computer readable medium or a medium similar to acomputer readable medium by using, for example, software, hardware, orany combination of software and hardware.

For a hardware implementation, the embodiment described herein may beimplemented by using at least one of an application-specific integratedcircuit (ASIC), a digital signal processor (DSP), a digital signalprocessing device (DSPD), a programmable logic device (PLD), a fieldprogrammable gate array (FPGA), a central processing unit (CPU), ageneral purpose processor, a microprocessor, and an electronic unit thatare designed to execute a function described herein. In some cases, thisembodiment may be implemented by using the processor 180.

For a software implementation, the embodiment of a program, a function,or the like described herein may be implemented by using an independentsoftware module. Each software module may execute one or more functionsor operations described herein.

Software code can be implemented by using a software applicationcompiled by using any proper programming language. The software code maybe stored in the memory 160 and executed by using the processor 180.

In addition, in an example embodiment, information processed on theelectronic device 100 may be displayed by using the display screen 151.

FIG. 2 is a processing method for an electronic device according to anembodiment of this application. As shown in FIG. 2, the method includesthe following steps.

Step S101: Display at least one application icon on a home screen pageof the electronic device.

The processing method in this embodiment is applied to an electronicdevice having a display screen and a plurality of applications. Thedisplay screen includes a touch-sensitive surface. The touch-sensitivesurface can sense a location pressed by a user and pressing force. Asmartphone is used as an example. Generally, when components areinitialized after the smartphone is started, the smartphone has a homescreen (home screen) initially displayed on a display screen, and thehome screen is also referred to as a home screen page. A plurality ofapplication icons may be displayed on the home screen page. For example,a plurality of application icons such as Camera, Photos, Phone, WeChat,and Amap are displayed on the home screen page of the smartphone. Inaddition to the home screen page, the smartphone may further include atleast one another screen page. The user may add an icon of anapplication program to the home screen page or the another screen page,and quickly open the corresponding application program by tapping theapplication icon. The application icon on the home screen page may bemoved to the another screen page, and an application icon on the anotherscreen page may also be moved to the home screen page.

Step S102: Detect a first heavy pressing operation performed on a firstapplication icon.

In this step, the first heavy pressing operation performed on the firstapplication icon is detected on the touch-sensitive surface, the firstapplication icon is one of the at least one application icon, and thefirst application icon corresponds to a first application. A smartphoneis still used as an example. The smartphone detects, on thetouch-sensitive surface, a first heavy pressing operation performed on acamera application icon.

Step S103: Display a first menu in response to the first heavy pressingoperation, where the first menu includes at least one first operationoption.

The first operation option is an operation option provided in the firstapplication, and the first operation option can be selected to start thefirst application and to enable a function corresponding to the selectedfirst operation option. The first menu may be displayed in response tothe first heavy pressing operation on the camera application icon. Theoperation option included in the first menu may be “Photograph”. Whenthe operation option “Photograph” is tapped, a camera application may bestarted to enter a photographing interface.

Step S104: The electronic device returns to the home screen page.

In this step, after starting the camera application to enter thephotographing interface, the electronic device may exit the cameraapplication and return to the home screen page. The user may return tothe home screen page by pressing a home button or tapping a main menukey.

Step S105: Detect a second heavy pressing operation performed on thefirst application icon.

In this step, the smartphone detects, on the touch-sensitive surface, asecond heavy pressing operation performed on a phone application icon.The second heavy pressing operation is another heavy pressing operationafter the first heavy pressing operation. Another heavy pressingoperation may be included between the second heavy pressing operationand the first heavy pressing operation. Alternatively, there may be noheavy pressing operation between the second heavy pressing operation andthe first heavy pressing operation.

Step S106: Display a second menu in response to the second heavypressing operation, and automatically adjust a second operation optionincluded in the second menu.

In this step, the second menu is displayed in response to the secondheavy pressing operation. The second menu is different from the firstmenu, and the second menu includes at least one second operation option.The electronic device automatically adjusts the second operation optionincluded in the second menu. The second operation option is also anoperation option provided in the first application. The second operationoption can also be selected to start the first application and to enablea function corresponding to the selected second operation option.

For example, the second menu may be displayed in response to a secondheavy pressing operation performed on a camera application icon. Theoperation option included in the second menu may be “Record a video”.When the operation option “Record a video” is tapped, a cameraapplication may be started to enter a recording interface.

The second menu is different from the first menu, and at least one ofthe following cases is included: The function corresponding to the firstoperation option is different from the function corresponding to thesecond operation option, for example, the first operation option is“Photograph”, and the second operation option is “Record a video”; aquantity of first operation options is different from a quantity ofsecond operation options, for example, the first menu includes one firstoperation option “Photograph”, and the second menu includes two secondoperation options: “Record a video” and “Capture a selfie” respectively;and a location of an operation option corresponding to a same functionin the first menu is different from that in the second menu, forexample, in the first menu, the first operation option “Photograph” isarranged above the second operation option “Record a video”, but in thesecond menu, the second operation option “Record a video” is arrangedabove the first operation option “Photograph”.

In this embodiment of this application, the electronic deviceautomatically adjusts the second operation option included in the secondmenu. An automatic adjustment process does not require intervention ofthe user. The automatic adjustment is not implemented based on input ofthe user. The user manually adjusts content or a location of anoperation option by using the input. This does not belong to a scope ofthe automatic adjustment in this embodiment of this application. Forexample, for a phone application, an operation option change related toa frequent contact and occurring when the user manually changes afrequent contact kept by the user belongs to a scope different from thescope to which the automatic adjustment described in this applicationbelongs.

The electronic device may automatically adjust, based on at least one ofthe following factors, the second operation option included in thesecond menu. The factors include: a quantity of times that the secondoperation option is tapped, a time at which the second heavy pressingoperation occurs, a location of the electronic device when the secondheavy pressing operation occurs, data obtained before the firstapplication is suspended, data obtained when the first application runsin the background, and the like. A combination of the foregoingdetermined factors may be preset by a system or the user. During anactual operation, any one of the foregoing determined factors may beselected based on a requirement, or the foregoing determined factors maybe randomly combined.

Referring to FIG. 3, the following describes in detail a process ofautomatically adjusting and displaying the second operation option basedon, for example, the quantity of times that the second operation optionis tapped.

In this application, an operation process of an application program maybe divided into a learning phase and an execution phase. In the learningphase, a processor 180 learns and collects statistics about a usagehabit of a user and running data of an application. In the executionphase, the processor determines, based on a statistical result, anoperation option included in a menu, and displays the operation option.Each operation performed on the application program may be considered asboth the learning phase and the execution phase.

In the learning phase, the processor 180 records an operation processafter the user opens an application each time, collects statistics abouta quantity of times that each operation option in each functionalinterface of the application is tapped, and arranges each operationoption based on a value of the quantity of times that each operationoption is tapped.

In the execution phase, the processor 180 determines at least one of thesecond operation option based on the quantity of times that theoperation option is tapped, and displays the second operation option ina form of a menu for the user.

At least one application icon is displayed on the display screen of theelectronic device. When a heavy pressing operation performed on theapplication icon is detected, the processor 180 generates a second menuincluding the at least one second operation option. The second operationoption in the second menu is arranged in the foregoing order. In otherwords, an operation option arranged on the top of the second menu istapped a largest quantity of times. Quantities of times that operationoptions arranged in the second menu are tapped sequentially descend fromtop to bottom.

When the second heavy pressing operation is detected, the second menu isdisplayed on the display screen. The user taps a second operation optionin the second menu, so that an application performs an operationcorresponding to the operation option.

As described above, the electronic device 100 disclosed in thisapplication may use any proper form, including but not limited to asmartphone 200 in FIG. 4(a) to FIG. 4(f). Referring to FIG. 4(a) to FIG.4(f), the following discusses more details about the smartphone 200.

One or more application programs are installed on the smartphone 200.The application program has different statuses: running stop (theapplication program is terminated or is not started), inactive (theapplication program is in the foreground, but no longer receives anevent, for example, the user locks a device when an app is active),active (the application program is in use), background running (theapplication program is not displayed on a screen, but still executescode), and suspended (the application program still resides in a memory,but is neither displayed on a screen nor executes code). Data obtainedbefore the application program is suspended and data obtained when theapplication program runs in the background are stored in a memory 160,so that the stored data is displayed to the user when the applicationprogram enters the foreground again.

As shown in FIG. 4(a) to FIG. 4(f), the processor 180 may display (ormay enable the display screen 251 to display) at least one applicationicon 201 on a display screen 251.

In the following first to fourth embodiments of this application, anoperation process of an application corresponding to an application iconis separately described by using an example of an application such asMap, Phone, or Messages. The application may be various applicationsused on an electronic device on which iOS®, Android®, Windows Phone®, oranother operating system is installed, and includes but is not limitedto Phone, Messages, Browser, Camera, Video, Memo, Reminder, Clock,Calendar, Weather, Settings, Music, File management, Share, WeChat,Weibo, Tencent, Map, Mail, Graphics library, Recycle bin. Applicationstore, Calculator, News, Games, and the like.

Based on the following technical solutions disclosed in thisapplication, the second menu is displayed on the display screen inresponse to the second heavy pressing operation performed when the userheavily presses the application icon, and the second menu includes atleast one second operation option. By selecting an operation optionincluded in a menu, the user can directly reach a wanted interfacewithout opening a functional interface of an application level by level.The at least one second operation option is determined based on at leastone of a quantity of times that the operation option is tapped, a timeat which the second heavy pressing operation occurs, a location of theelectronic device when the operation option is tapped, unreadinformation in the application, data obtained before the application issuspended, data obtained when the application runs in the background,and a communication object in the application. A specific implementationis as follows.

The following four embodiments are specific embodiments in differentapplication scenarios. An Amap application is used as an example in thefirst embodiment, a phone application is used as an example in thesecond embodiment, a short message service message application is usedas an example in the third embodiment, and an Alipay application and acamera application are used as examples in the fourth embodiment. Withreference to the following first to fourth embodiments, a person skilledin the art may better understand the solutions of this application, andthe foregoing objective, features, and advantages of this applicationcan be more obvious and more understandable. The process ofautomatically adjusting the second operation option included in thesecond menu is emphasized in the following four embodiments.

First Embodiment

Referring to content shown in FIG. 4(a) to FIG. 4(f) and FIG. 5A andFIG. 5B, an operation process of a map application corresponding to anicon 201 is described by using Amap as an example.

In a learning phase, a processor 180 records a process of using an Amapapplication by a user each time. A main interface of the Amapapplication and some level-2 functional interfaces of the main interfaceare described first.

There are four different operation options “Search”, “Nearby”, “Route”,and “Mine” in the main interface of Amap. The user may select theoperation option “Search” in the main interface, and enter “XXX” in aninput box. Optionally, the “XXX” is a location, a bus, a metro, or thelike. The location may be a street, a building, a scenic spot, or thelike. After the user completes input in the input box, the applicationprovides one or more corresponding search results. After the userselects a search result A from the one or more search results, Amapenters a level-2 functional interface.

There are three different operation options “Search nearby”, “Go”, and“Navigate” in the level-2 functional interface of the operation option“Search”. The user may select the operation option “Navigate” in thelevel-2 interface to enter a navigation functional interface of the mapapplication. In the navigation functional interface, the map applicationguides the user to drive from a current location to a locationcorresponding to the search result A. Alternatively, the user may selectthe operation option “Search nearby” in the level-2 interface to enter asearch interface of the map application. In the search interface, theuser may search for a food, a hotel, a parking lot, or the like near thesearch result A.

Optionally, the user may alternatively select the operation option“Route” in the main interface. In a level-2 functional interface of theoperation option “Route”, the user may go from a start point location toA by selecting one of three manners: “Drive”, “Take a bus”, or “Walk”.

The processor 180 records and collects statistics about a usageoperation after the user opens the Amap application each time, recordsan association relationship between a main interface operation and alevel-2 functional interface operation, and stores a result in a memory160 according to a format in the following Table 1.

TABLE 1 Amap Level-2 interface operation Main interface operation SearchTake Time Location Number Search Nearby Route Mine nearby Go NavigateDrive a bus Walk Daytime Night Home Company 1 1 1 ✓ ✓ 2 1 1 ✓ ✓ 3 1 1 ✓✓ 4 1 1 ✓ ✓ 5 1 1 ✓ ✓ 6 1 1 ✓ ✓ 7 1 1 ✓ ✓ 8 1 1 ✓ ✓ 9 1 1 ✓ ✓ 10 1 1 ✓ ✓

A record having a number of 1 indicates that in the usage, the usersequentially selects “Search” and “Navigate” respectively from theoperation options in the main interface and the operation options in thelevel-2 interface, and the usage is an operation performed by the userat home at night. Referring to the record having the number of 1,content indicated by a remaining record can be understood.

Based on records in Table 1, without considering a time factor and alocation factor, a commonly-used operation of the user in the maininterface is “Search”, and a next commonly-used operation after “Search”is “Navigate”. When the location factor is considered, a commonly-usedoperation in the main interface when the user is near a company is“Route”, and a next commonly-used operation after “Route” is “Walk”.When the time factor is considered, a commonly-used operation that is ofthe user at night and that is in the main interface is “Search”, and anext commonly-used operation after “Search” is “Navigate”.

For ease of description, an included operation option in a level-2interface of the operation option “Nearby” or “Mine” in the maininterface is omitted in Table 1. During actual usage, a person skilledin the art may add an option to Table 1 based on an actual case.

In Table 1, location factors are distinguished based on the twolocations: at home and in the company, and time factors aredistinguished based on two time periods: in daytime and at night. Theseare only examples, and are not used to limit this application. A personskilled in the art may further subdivide the location or the time basedon a requirement.

In an execution phase, the processor 180 determines a currentlyexecutable operation option and displays the operation option to theuser in a form of a menu 202. How to determine and adjust a secondoperation option included in a second menu is separately described belowin different cases.

In the following first to fourth cases, before the user heavily pressesthe icon 201, the map application is in a running stop state. In thefollowing fifth and sixth cases, before the user heavily presses theicon 201, the map application is in a background running state or in asuspended state.

First Case

In the first case, when the user heavily presses the icon 201, theprocessor 180 determines, based on Table 1 recorded in the learningphase, that an operation that is in the main interface and that is mostcommonly used by the user is “Search”, and a relatively commonly-usedoperation is “Route”. Therefore, as shown in FIG. 4(a), in a menu 202displayed in response to the heavy press, operation options 203 to 208arranged from top to bottom are respectively: 203 “Search”, 204 “Route”,205 “Go home”, 206 “Go to the company”, 207 “Send my location”, and 208“Nearby”. The operation options 203 and 204 are determined based onquantities of times that the user taps the operation options, and theoperation options 205 to 208 are options preset by a system. Theoperation option 203 “Search” is an operation option that is tapped alargest quantity of times.

Second Case

In the second case, when the user heavily presses the icon 201 in thecompany, the processor 180 determines, based on Table 1 recorded in thelearning phase, that an operation that is in the main interface and thatis most commonly used by the user when the user is in the company is“Route”, and an operation most commonly used in the level-2 functionalinterface is “Walk”. Therefore, as shown in FIG. 4(b), operation options213 to 218 arranged from top to bottom in the menu 202 are respectively:213 “Route”, 214 “Walk”, 215 “Go home”, 216 “Go to the company”, 217“Send my location”, and 218 “Nearby”. The operation options 213 and 214are determined based on a location of a smartphone, and the operationoptions 215 to 218 are options preset by a system. When the location ofthe smartphone 200 is an address of the company in which the user islocated, the operation option 213 “Route” is an operation option that istapped a largest quantity of times.

In the second case, the operation options 213 and 214 are respectivelyan operation most commonly used in the main interface and an operationmost commonly used in the level-2 functional interface. Optionally, anoperation option 214′ may be alternatively the operation “Search” thatis relatively commonly-used in the main interface. Alternatively,optionally, operation options 213″ and 214″ are respectively theoperation “Walk” and the operation “Search nearby” that are mostcommonly used in the level-2 functional interface.

Third Case

In the third case, when the user heavily presses the icon 201 at night,the processor 180 determines, based on Table 1 recorded in the learningphase, that an operation that is in the main interface and that is mostcommonly used by the user at night is “Search”, and an operation mostcommonly used in the level-2 functional interface is “Navigate”.Therefore, as shown in FIG. 4(c), operation options 223 to 228 arrangedfrom top to bottom in the menu 202 are respectively: 223 “Search”, 224“Navigate”, 225 “Go home”, 226 “Go to the company”, 227 “Send mylocation”, and 228 “Nearby”. The operation options 223 and 224 aredetermined based on times at which the user taps the operation options,and the operation options 215 to 218 are options preset by a system.

In the third case, when the user heavily presses the icon 201 in thedaytime, operation options 223′ to 228′ that is in the menu displayed onthe display screen and that is arranged from top to bottom by theprocessor 180 based on a statistical result in the learning phase aredifferent from the operation options 223 to 228. Optionally, 223′ is“Nearby”, and 224′ is “Food”.

Fourth Case

In the fourth case, when the user heavily presses the icon 201 at homeat night, the processor 180 determines, based on Table 1 recorded in thelearning phase, that operations previously performed by the user at thesame location at the same time are both first selecting “Search” in themain interface, and then selecting “Navigate” in the level-2 functionalinterface. Therefore, as shown in FIG. 4(d), operation options 233 to237 arranged from top to bottom in the menu 202 are respectively: 233“Navigate”, 234 “Go home”, 235 “Go to the company”, 236 “Send mylocation”, and 237 “Nearby”. The operation option 233 is determinedbased on both a time at which the user taps the operation option and alocation of a smartphone when the user taps the operation option, andthe operation options 234 to 237 are options preset by a system.

In the first to fourth cases, operation options include an operationoption determined based on a quantity of times that the user taps theoperation option, a tapping time, and/or a location of a smartphone whenthe user taps the operation option, and also include an operation optionpreset by a system. Optionally, an operation option in the menu 202displayed in response to a heavy press is an operation option determinedbased on a quantity of times that the user taps the operation option, atapping time, and/or a location of a smartphone when the user taps theoperation option, where the menu 202 does not include the operationoption present by the system.

Fifth Case

In the fifth case, as shown in FIG. 5A and FIG. 5B, statistics about ausage operation of the user are collected in the learning phase, and theusage operation includes an operation after a main interface is opened,an operation in a level-2 functional interface, and an operation timeand an operation location. In addition, an association relationshipbetween a main interface operation and a level-2 functional interfaceoperation is further recorded in the learning phase. In the executionphase, when the user uses a map application, the user selects “Search”from the operation options in the main interface, enters the “ForbiddenCity” into an input box, and then selects the “Palace Museum” in asearch result provided by the map application.

The processor 180 determines executable operation options 243 to 245 inthe level-2 functional interface based on operation data of the maininterface. For example, the operation options include 243“Navigate-Palace Museum”, 244 “Search nearby-Palace Museum”, and 245“Go-Palace Museum”.

In this case, an operation performed by the user on the map applicationmay be interrupted by another event (the another event is, for example,that the smartphone 200 receives an incoming call, and the user opens aphone application to answer the call), and the map application isswitched to the background to run or is suspended after running in thebackground for a time period. For example, the map application mayremain online for 5 minutes after entering the background. In this case,the map application may still receive data. For example, the mapapplication may periodically determine a current location of thesmartphone 200. After the map application enters the background for 5minutes, the map application is suspended. In other words, the mapapplication no longer receives and sends data.

When the processor 180 detects that the map application is in abackground running state or in a suspended state, the processor 180obtains data obtained before the map application is suspended and dataobtained when the map application runs in the background, and determinesa currently executable operation option based on the foregoing data.

When the currently executable operation option is determined, whetherthe operation options 243 to 245 are valid needs to be determined. Ifthe operation options 243 to 245 are invalid (to be discussed in thefollowing sixth case), the operation options 243 to 245 are deleted.Alternatively, if the operation options 243 to 245 are valid (stillexecutable), the operation options 243 to 245 are still stored.

After answering the call, the user heavily presses the icon 201 of themap application on a screen of the mobile phone 200 by using a finger.As shown in FIG. 4(e), in this case, the processor 180 enables thesmartphone 200 to display the menu 202 on a display screen 251 of thesmartphone 200. The menu 202 is used to inform the user of the currentlyexecutable operation options 243 to 249 in the map application. Theoperation options 243 “Navigate-Palace Museum”, 244 “Searchnearby-Palace Museum”, and 245 “Go-Palace Museum” are determined basedon the data obtained before the map application is suspended, and theoperation options 246 “Go home”, 247 “Go to the company”, 248 “Send mylocation”, and 249 “Nearby” are options preset by a system.

Optionally, the operation options in the menu 202 include 243“Navigate-Palace Museum”, 244 “Search nearby-Palace Museum”, and 245“Go-Palace Museum”. The operation options 243 to 245 are all validoperation options determined based on the data obtained before theapplication is suspended. In this case, the menu 202 does not includethe options preset by the system.

Optionally, the operation options in the menu 202 include 243, 244, and246 to 249. The processor 180 determines, based on Table 1 recorded inthe learning phase, that a next operation most commonly used by the userafter “Search” is “Navigate”, and a relatively commonly-used operationis “Search nearby”. In other words, the processor 180 determines theoperation option 243 “Navigate-Palace Museum” and 244 “Searchnearby-Palace Museum” based on quantities of times that the operationoptions are tapped and the data obtained before the application issuspended.

Optionally, the operation options in the menu 202 include 243 and 246 to249.

In the fifth case, after the user selects the “Palace Museum”, the mapapplication is immediately switched to the background to run or issuspended after running in the background for a time period. Optionally,after the operation of the user has been performed for a time period,the map application is switched to the background. The data obtainedbefore the application is suspended includes data of all operationsafter the application is opened.

Sixth Case

A difference between the sixth case and the fifth case is that, beforethe operation performed by the user on the map application isinterrupted by the another event, the user further performs an operationon the map application.

For example, the further operation performed by the user on the mapapplication is closing the application, deleting the search result“Palace Museum” in the previous operation, performing a new search, orviewing details about the “Palace Museum”. The processor 180 determines,at a predetermined interval based on latest data of the alreadyperformed operation, whether the determined operation option is valid,adjusts the operation option in real time, reserves a valid andexecutable operation option, and deletes an invalid operation option.For example, when the map application is closed, all operation options243 to 249 are deleted. When the user deletes the search result “PalaceMuseum” from the map application, the operation options 243“Navigate-Palace Museum”, 244 “Search nearby-Palace Museum”, and 245“Go-Palace Museum” are invalid operation options, the operation options243 to 245 are deleted, and the operation options 246 to 249 arereserved. When the user deletes the search result “Palace Museum” fromthe map application and newly searches for “Tian'anmen”, and furtherselects the “Tian'anmen Square”, new operation options 253 to 255 aregenerated to replace the invalid operation options 243 to 245 in theoperation options, the operation option 253 is “Navigate-Tian'anmenSquare”, 254 is “Search nearby-Tian'anmen Square”, 255 is “Go-Tian'anmenSquare”, and the valid operation options 246 to 249 remains unchanged.When the user views only the details in the map application, all theforegoing operation options 243 to 249 are still stored.

Herein, how an operation option included in the menu 202 changes isdescribed by using an example in which the further operation of the useris searching for “Tian'anmen” and selecting the “Tian'anmen Square”.

The map application is subsequently switched to the background to run oris suspended after running in the background for a time period. This isthe same as the fifth case. In this case, the processor 180 stores thedata obtained before the map application is suspended.

After answering a call, the user heavily presses the icon 201 of the mapapplication on a screen of a mobile phone 200 by using a finger. Asshown in FIG. 4(f), in this case, the processor 180 enables thesmartphone 200 to pop up the menu 202 on a display screen 251 of thesmartphone 200. The menu 202 is used to inform the user of the currentlyexecutable operation options 253 to 255 and 246 to 249 in the mapapplication. The operation options 253 to 255 are determined based onthe data obtained before the application is suspended.

The map application can receive and send data when running in thebackground, and the processor 180 can determine an operation optionbased on the data obtained when the application runs in the background.For example, the map application receives road condition data whenrunning in the background, and the processor 180 determines an operationoption based on the road condition data, and when a road is closed,determines that the operation option is walking.

In the foregoing fifth and sixth cases, before the user heavily pressesthe icon 201, the map application is switched only once to thebackground to run or is suspended only once after running in thebackground for a time period. Optionally, a quantity of times that themap application is switched to the background to run or is suspended inthe background may be greater than 1.

Each time the map application is switched from the background runningstate or the suspended state to an active state, the user may operatethe map application. The processor 180 stores the data obtained beforethe map application is suspended and the data obtained when the mapapplication runs in the background, and determines, based on the data,the operation option displayed in the menu.

In the foregoing fifth and sixth cases, the operation options includethe operation option determined based on the data obtained before themap application is suspended, and also include an operation optionpreset by a system. Optionally, the operation option that is in the menu202 displayed in response to the heavy press is the operation optiondetermined based on the data obtained before the map application issuspended, and does not include the operation option preset by thesystem.

In the foregoing first to sixth cases, at least one of the operationoptions is determined based on a quantity of times that the user tapsthe operation option, a tapping time, a location of the smartphone whenthe user taps the operation option, the data obtained when theapplication runs in the background, and/or the data obtained before theapplication is suspended. The operation options are arranged based on ausage habit of the user. For example, the operation options are arrangedfrom top to bottom in descending order of quantities of times that theoperation options are tapped. Because content in the menu 202 moreconforms to a habit of the user, the user may conveniently tap anoperation option arranged on the top, to perform a correspondingoperation, improving usage experience of the user.

Second Embodiment

When an application has unread information, statistics about differentoperations performed when a user views the unread information iscollected in a learning phase. The unread information includes a missedcall, an unread short message service message, an unread instantmessaging message, or an unread notification message.

Referring to content shown in FIG. 6(a) and FIG. 6(b), an operationprocess of a phone application corresponding to an application icon 301is described by using the phone application as an example.

In the learning phase, the processor 180 records a process of using thephone application by the user each time. For example, based on astatistical result, for the phone application, without considering atime factor and a location factor, when there is a missed call, anoperation performed by the user a largest quantity of times is “viewinga missed call+dialing back for the missed call”. When the locationfactor is considered, an operation performed by the user a largestquantity of times in a company is “viewing a missed call+sending a shortmessage service message for the missed call”.

In an execution phase, the processor 180 determines a currentlyexecutable operation option and displays the operation option in a formof a menu 302 to the user.

When the phone application has a missed call, the processor 180 displaysa missed call notification message on the display screen 251, forexample, displays “2” indicating a quantity of missed calls in an upperright corner of the icon 301. Further, the processor 180 stores numberinformation 13800138000 of the missed call, and the processor 180determines an operation option of an executable operation based on thestatistical result in the learning phase. For example, the operationoption includes 303 “View the missed call and dial back for the missedcall 13800138000”, 304 “View the missed call and send a short messageservice message to the missed call 13800138000” 305 “Call a contactMike”, 306 “Call a contact Tom”, and 307 “Add a new contact”.

When the user heavily presses the icon 301, as shown in FIG. 6(a), theprocessor 180 displays the menu 302 on the display screen 251 inresponse to the heavy press. The operation options 303 to 307 aresequentially arranged from top to bottom in the menu 302. The operationoptions 303 and 304 are based on the unread information in theapplication, the operation options 305 and 306 are based on quantitiesof times that the operation options are tapped, and the contact Mikecorresponding to the operation option 305 is a contact that is called bythe user a largest quantity of times. The operation option 307 is anoption preset by a system.

Optionally, when the user heavily presses the icon 301 in a company,because an operation performed by the user in the company a largestquantity of times is “viewing a missed call+sending a short messageservice message for the missed call”, as shown in FIG. 6(b), arrangementlocations of the operation options “View the missed call and dial backfor the missed call 13800138000” and “View the missed call and send ashort message service message for the missed call 13800138000” in themenu 302 are exchanged.

Optionally, the operation options in the menu 302 include 303 and 305 to307. In other words, the operation option determined based on the unreadinformation in the application includes only the operation option 303that is most commonly used by the user.

Optionally, the processor 180 adjusts content in an operation optionbased on data obtained before the application is suspended. For example,when the missed call 13800138000 has been browsed, the operation options303 and 304 are deleted; when the missed call 13800138000 is notbrowsed, the operation options 303 and 304 are still stored.

Optionally, the application corresponding to the icon 301 may be anapplication market, and there is unread notification information of oneor more to-be-updated applications in the application market. When theuser heavily presses the icon 301 of the application market by using afinger, the menu 302 includes an operation option 308 “Update all”.

Optionally, the application corresponding to the icon 301 may be anotherapplication such as Messages, QQ. WeChat, or Mail. The processordetermines at least one operation option in the menu 302 based on theunread information in the application, and the unread informationincludes a missed call, an unread short message service message, anunread mail, an unread instant messaging message, an unread notificationmessage, or the like. The at least one operation option included in themenu 302 is determined based on the unread information in theapplication.

Third Embodiment

Referring to content shown in FIG. 7(a) and FIG. 7(b), an operationprocess of a short message service message application corresponding toan icon 401 is described by using the short message service messageapplication as an example.

In a learning phase, a processor 180 records and collects statisticsabout a usage operation performed by a user on the short message servicemessage application, and stores a result in a memory 160 in a format ofthe following Table 2.

TABLE 2 Short message service message Contact receiving or sending ashort Receiving time or Number message service message sending time 1Mike 20160526100830 2 Tom 20160525231000 3 Jack 20160525124550 4 Mary20160419062237 5 Tracy 20160320090830 6 . . . . . .

A record having a number of 1 indicates that a contact receiving orsending a short message service message is Mike, and a time forreceiving or sending a short message service message is 2016/5/2610:08:30. Referring to the record having the number of 1, contentindicated by a remaining record can be understood.

When the same contact performs a new operation of receiving or sending ashort message service message, the original time in Table 2 is coveredby using latest time for performing the receiving or sending operation.

Optionally, a time and/or a location for using the short message servicemessage application by the user are/is further recorded in Table 2. Forexample, the time may be divided into two time periods in the firstembodiment: in the daytime and at night, and the location may be dividedinto two locations: at home and in a company.

The processor obtains a communication object in the application. Thecommunication object in the short message service message applicationprovided in this embodiment is a contact. The processor arranges thecontact. The arrangement is performed based on a time for communicatingwith the contact (the time for receiving or sending a short messageservice message). An earlier communication time indicates lower arrangedlocation. For example, for a fifth record in Table 2, because of anearliest time for receiving or sending a short message service message,the contact Tracy corresponding to the fifth record is arranged at thebottom during arrangement.

In an execution phase, the processor 180 determines an operation optionbased on the communication object in the application. The processorextracts first n (1<n≤5) contacts from a sequence of contacts, andgenerates operation options corresponding to the n contacts.

As shown in 7(a), when n=4, operation options 403 to 406 arranged fromtop to bottom in a menu 402 displayed in response to the heavy press arerespectively: 403 “Send a short message service message to Mike”, 404“Send a short message service message to Tom”, 405 “Send a short messageservice message to Jack”, and 406 “Send a short message service messageto Mary”.

In the execution phase, the processor 180 further detects whether arecord is newly added to Table 2. When there is a newly added recordbefore the application is suspended or when the application runs in thebackground, for example, a short message service message sent by thecontact Tracy is received at 2016/5/26 18:00:00, in this case, theoperation option 406 arranged at the bottom in FIG. 7(a) is deleted, andan operation option 413 corresponding to the newly added communicationobject Tracy is generated. As shown in FIG. 7(b), the operation option413 corresponding to the newly added communication object is arranged onthe top when an application icon 401 is heavily pressed.Correspondingly, the operation options 403 to 405 in FIG. 7(a) aresequentially adjusted to operation options 414 to 416 in FIG. 7(b).

Optionally, when there is no record of the newly added communicationobject in Table 2, a record related to the communication object is addedto Table 2.

In this embodiment, the operation options are arranged based on timesfor communicating with the communication object, and the operationoptions are arranged based on times for communicating with communicationobjects from late to early that correspond to the operation options. Alate time for communicating with the communication object indicates thatthe time for communicating with the communication object is relativelylate. In other words, the time for communicating with the communicationobject is closer to a moment at which the heavy press occurs.Optionally, the processor 180 arranges the operation options based onquantities of times of communicating with the communication object.

In this embodiment, generated operation options corresponding to ncommunication objects are described by using an example. Optionally, theoperation options included in the menu 402 are all determined based onthe communication objects.

Optionally, content of an operation option is adjusted based on a timeand/or a location for heavily pressing the icon 401 by the user, so thatat least one operation option is determined based on a location of asmartphone when the user taps the operation option and/or a tappingtime. A specific adjustment manner is similar to the adjustment mannerin the foregoing embodiment, and details are not described herein again.

In the third embodiment, that the processor 180 determines the operationoption based on the communication object in the application is describedby using the short message service message application as an example,and the operation options are arranged from top to bottom in the menu indescending order of quantities of times of communicating with thecommunication object or based on the communication time from late toearly.

The operation option determined based on the communication object in theapplication includes information about the communication object. In theshort message service message application, the information about thecommunication object is a phone number. When the applicationcorresponding to the icon 401 is another application other than theshort message service message, the information about the communicationobject includes but is not limited to any one of the phone number, anapplication account number, a mail address, a user identifier, and auser name.

Optionally, the application corresponding to the icon 401 is Phone.Mail, Mobile banking, WeChat, or another social application, and theuser communicates with another communication object by using theapplication corresponding to the icon 401. In the applicationcorresponding to the icon 401, the processor 180 determines, based onthe communication object in the application, the operation optiondisplayed in the menu.

Optionally, the operation option determined based on the communicationobject in the application includes information about a family member orinformation about a particular contact, and the operation optionincluding the information about the family member or the informationabout the particular contact may be arranged on the top of the menu.

Fourth Embodiment

The processor 180 may record and collect statistics about commonly-usedapplications of a user in different time periods and at differentlocations, and usage operations performed on the application in thedifferent time periods and at the different locations. For example, at alocation, a commonly-used application of the user is “Alipay”, andoperations that are most frequently used in the “Alipay” application atthe location are “Pay” and “Scan”. Optionally, the location is asupermarket near a house of the user.

In an execution phase, the processor 180 first determines a location ofthe mobile phone 200 by using the location positioning module 115. Forexample, the location is the supermarket near the house of the user.Therefore, when the user heavily presses an icon of the Alipayapplication on a screen of the mobile phone 200 by using a finger, theprocessor 180 enables the smartphone 200 to display a menu on thedisplay screen 251 of the smartphone 200, and the menu includes theoperation options “Pay” and “Scan” based on the location of theelectronic device. If the location determined by using the locationpositioning module 115 is a residence of the user, operation optionsincluded the menu displayed when the heavy press is performed are“Transfer” and “Yu'E Bao” that are most frequently used by the user athome.

Optionally, in the execution phase, the processor 180 first determines acurrent time. If the current time is one day before a statement date ofa credit card of the user, the operation option included in the menuthat pops up when the heavy press is performed is “Transfer” that ismost frequently used by the user before the statement date.

In addition to the foregoing listed cases, a person skilled in the artmay obtain a plurality of implementations through expansion. Forexample, when the location positioning module 115 determines that thelocation of the mobile phone 200 is a scenic spot, the user heavilypresses an icon of a camera application by using a finger. In this case,the menu includes a thumbnail of a picture took by another user in thescenic spot, to provide reference of framing and image compositionand/or a photographing location for the user. For example, when anapplication icon is a music-type application, when a song sung by asinger M is being played before the application is suspended, operationoptions that may be included in the menu displayed in response to aheavy press are “Play all songs of the singer M” and “Search for allsongs of the singer M”.

Referring to the first to fourth embodiments, the scenarios to whichthis application is applied is described by using the examples.Optionally, operations corresponding to operation options in a menuinclude a commonly-used operation preset by a system and an operationdetermined based on statistics. Optionally, the operations correspondingto the operation options in the menu include all operations that can beexecuted in an interface of the application.

The method steps described with reference to the content disclosed inthis application may be implemented in a hardware manner, or may beimplemented in a manner of executing a software instruction by aprocessor. The software instruction may include a corresponding softwaremodule. The software module may be stored in a RAM memory, a flashmemory, a ROM memory, an EPROM memory, an EEPROM memory, a register, ahard disk, a removable hard disk, a CD-ROM memory, or a storage mediumin any other forms well-known in the art. An example storage medium iscoupled to the processor, so that the processor can read informationfrom the storage medium, and can write information into the storagemedium. Certainly, the storage medium may be a part of the processor.The processor and the storage medium may be located in an ASIC. Inaddition, the ASIC may be located in user equipment. Certainly, theprocessor and the storage medium may exist in the user equipment asdiscrete components.

All or some of the foregoing embodiments may be implemented by usingsoftware, hardware, firmware, or any combination thereof. When softwareis used to implement the embodiments, the embodiments may be implementedcompletely or partially in a form of a computer program product. Thecomputer program product includes one or more computer instructions.When the computer program instructions are loaded and executed on thecomputer, the procedures or functions according to the embodiments ofthe present invention are all or partially generated. The computer maybe a general-purpose computer, a dedicated computer, a computer network,or another programmable apparatus. The computer instructions may bestored in a computer-readable storage medium or may be transmitted froma computer-readable storage medium to another computer-readable storagemedium. For example, the computer instructions may be transmitted from awebsite, computer, server, or data center to another website, computer,server, or data center in a wired (for example, a coaxial cable, anoptical fiber, or a digital subscriber line (DSL)) or wireless (forexample, infrared, radio, microwave, or the like) manner. Thecomputer-readable storage medium may be any usable medium accessible toa computer, or a data storage device integrating one or more usablemedia, such as a server or a data center. The usable medium may be amagnetic medium (for example, a floppy disk, a hard disk, or a magnetictape), an optical medium (for example, a DVD), a semiconductor medium(for example, a solid state disk Solid State Disk, (SSD)), or the like.

In the foregoing specific implementations, the objective, technicalsolutions, and benefits of this application are further described indetail. It should be understood that the foregoing descriptions aremerely specific implementations of this application, but are notintended to limit the protection scope of this application. Anymodification, equivalent replacement, or improvement made based on thetechnical solutions of this application shall fall within the protectionscope of this application.

What is claimed is:
 1. A method, comprising: displaying an applicationicon on a home screen page of an electronic device, wherein theapplication icon corresponds to one application, wherein the applicationprovides a plurality of operations options comprising one or more maininterface operations and one or more level-2 interface operations, andwherein the application enters a level-2 interface operation of the oneor more level-2 interface operations after selecting a main interfaceoperation from the one or more main interface operations; collectingstatistics about usage of the one or more main interface operations andthe one or more level-2 interface operations when the application isopened; recording a plurality of association relationships between theone or more main interface operations and the one or more level-2interface operations based on the collected statistics, wherein eachrecorded association relationship of the recorded associationrelationships indicates a sequence of usage of one of the level-2interface operations after one of the main interface operations at arespective time and a respective location; detecting, on atouch-sensitive surface of a display screen, a first pressing operationperformed on the application icon; displaying a first menu in responseto detecting the first pressing operation performed on the applicationicon, wherein the first menu comprises one or more first operationoptions for performing one or more different first functions provided inthe one application, wherein the one or more first operation options arearranged in a first order in the first menu, wherein the one or morefirst operation options in the first menu comprise both a first maininterface operation of the main interface operations and a first level-2interface operation of the level-2 interface operations, and whereineach first operation option is selectable to start the application andto enable a first function of the one or more first functions thatcorresponds to the first operation option; returning to the home screenpage after displaying the first menu; detecting, on the touch-sensitivesurface, a second pressing operation performed on the application icon;in response to detecting the second pressing operation performed on theapplication icon, displaying a second menu, wherein the second menu isdifferent from the first menu and comprises one or more second operationoptions for performing one or more different second functions providedin the one application, wherein the one or more second operation optionsare arranged with the one or more first operation options in a secondorder in the second menu, wherein the one or more second operationoptions in the second menu comprise both a second main interfaceoperation of the main interface operations and a second level-2interface operation of the level-2 interface operations, wherein atleast one of the one or more second operation options is not included inthe one or more first operation options in the first menu, wherein thesecond order of the one or more second operation options in the secondmenu is different than the first order of the one or more operationoptions in the first menu, and wherein each second operation option ofthe second operation options is selectable to start the application andto enable a second function of the one or more second functions thatcorresponds to the second operation option; and adjusting a firstlocation of the one or more first operation options in the first menu ora second location of the one or more second operation options in thesecond menu based on the recorded plurality of association relationshipsbetween the one or more main interface operations and the one or morelevel-2 interface operations.
 2. The method of claim 1, furthercomprising adjusting the first location of the one or more firstoperation options or the second location of the one or more secondoperation options based on a quantity of times that the one or morefirst operation options and the one or more second operation options aretapped.
 3. The method of claim 1, further comprising adjusting the firstlocation of the one or more first operation options or the secondlocation of the one or more second operation options based on a time atwhich the second pressing operation occurs.
 4. The method of claim 1,further comprising adjusting the first location of the one or more firstoperation options or the second location of the one or more secondoperation options based on a third location of the electronic devicewhen the second pressing operation occurs.
 5. The method of claim 1,further comprising adjusting the first location of the one or more firstoperation options or the second location of the one or more secondoperation options based on a missed call in the application, wherein theapplication is a phone application, and wherein the one or more firstfunctions and the one or more second functions include dialing a phonenumber of the missed call.
 6. The method of claim 1, further comprisingadjusting the first location of the one or more first operation optionsor the second location of the one or more second operation options basedon unread information in the application, wherein the one or more firstfunctions and the one or more second functions comprise viewing theunread information, replying to the unread information, or dialing aphone number from which the unread information is sent.
 7. The method ofclaim 1, further comprising adjusting the first location of the one ormore first operation options or the second location of the one or moresecond operation options based on data obtained before the applicationis suspended.
 8. The method of claim 1, further comprising adjusting thefirst location of the one or more first operation options or the secondlocation of the one or more second operation options based on dataobtained when the one application runs in a background on the electronicdevice.
 9. The method of claim 1, further comprising adjusting the firstlocation of the one or more first operation options or the secondlocation of the one or more second operation options based on a time forcommunicating with a communication object of the application.
 10. Themethod of claim 9, wherein the communication object comprises a phonenumber, an application account number, a mail address, a useridentifier, or a user name.
 11. An electronic device, comprising: adisplay screen; a processor coupled to the display screen; and a memorycoupled to the processor and storing instructions that, when executed bythe processor, cause the electronic device to be configured to: displayan application icon on a home screen page of the electronic device,wherein the application icon corresponds to one application, wherein theapplication provides a plurality of operations options comprising one ormore main interface operations and one or more level-2 interfaceoperations, and wherein the application enters a level-2 interfaceoperation of the one or more level-2 interface operations afterselecting a main interface operation from the one or more main interfaceoperations; collect statistics about usage of the one or more maininterface operations and the one or more level-2 interface operationswhen the application is opened; record a plurality of associationrelationships between the one or more main interface operations and theone or more level-2 interface operations based on the collectedstatistics, wherein each recorded association relationship of therecorded association relationships indicates a sequence of usage of oneof the level-2 interface operations after one of the main interfaceoperations at a respective time and a respective location; detect, on atouch-sensitive surface of the display screen, a first pressingoperation performed on the application icon; display a first menu inresponse to detecting the first pressing operation performed on theapplication icon, wherein the first menu comprises one or more firstoperation options for performing one or more different first functionsprovided in the one application and respectively, wherein the one ormore first operation options are arranged in a first order in the firstmenu, wherein the one or more first operation options in the first menucomprise both a first main interface operation of the main interfaceoperations and a first level-2 interface operation of the level-2interface operations, and wherein each first operation option of the oneor more first operation options is selectable to start the applicationand to enable a first function of the one or more first functions thatcorresponds to the first operation option; return to the home screenpage after displaying the first menu; detect, on the touch-sensitivesurface, a second pressing operation performed on the application icon;in response to detecting the second pressing operation performed on theapplication icon, display a second menu, wherein the second menu isdifferent from the first menu and comprises one or more second operationoptions for performing one or more different second functions providedin the one application, wherein the one or more second operation optionsare arranged with the one or more first operation options in a secondorder in the second menu, wherein the one or more second operationoptions in the second menu comprise both a second main interfaceoperation of the main interface operations and a second level-2interface operation of the level-2 interface operations, wherein atleast one of the one or more second operation options is not included inthe one or more first operation options in the first menu, wherein thesecond order of the one or more second operation options in the secondmenu is different than the first order of the one or more operationoptions in the first menu, and wherein each second operation option ofthe one or more second operation options is selectable to start theapplication and to enable a second function of the one or more secondfunctions that corresponds to the second operation option; and adjust afirst location of the one or more first operation options in the firstmenu a second location of or the one or more second operation options inthe second menu based on the recorded plurality of associationrelationships between the one or more main interface operations and theone or more level-2 interface operations.
 12. The electronic device ofclaim 11, wherein the instructions further cause the electronic deviceto adjust the first location of the one or more first operation optionsor the second location of the one or more second operation options intothe second order in the second menu based on a quantity of times thatthe one or more first operation options and the one or more secondoperation options are tapped.
 13. The electronic device of claim 11,wherein the instructions further cause the electronic device to adjustthe first location of the one or more first operation options or thesecond location of the one or more second operation options into thesecond order in the second menu based on a time at which the secondpressing operation occurs.
 14. The electronic device of claim 11,wherein the instructions further cause the electronic device to adjustthe first location of the one or more first operation options or thesecond location of the one or more second operation options into thesecond order in the second menu based on a location of the electronicdevice when the second pressing operation occurs.
 15. The electronicdevice of claim 11, wherein the instructions further cause theelectronic device to adjust the first location of the one or more firstoperation options or the second location of the one or more secondoperation options into the second order in the second menu based on amissed call in the application, wherein the application is a phoneapplication, and wherein the one or more first functions and the one ormore second functions include dialing a phone number of the missed call.16. The electronic device of claim 11, wherein the instructions furthercause the electronic device to adjust the first location of the one ormore first operation options or the second location of the one or moresecond operation options into the second order in the second menu basedon unread information in the application, and wherein the one or morefirst functions and the one or more second functions comprise viewingthe unread information, replying to the unread information, or dialing aphone number from which the unread information is sent.
 17. Theelectronic device of claim 11, wherein the instructions further causethe electronic device to adjust the first location of the one or morefirst operation options or the second location of the one or more secondoperation options into the second order in the second menu based on dataobtained before the application is suspended.
 18. The electronic deviceof claim 11, wherein the instructions further cause the electronicdevice to adjust the first location of the one or more first operationoptions or the second location of the one or more second operationoptions into the second order in the second menu based on data obtainedwhen the one application runs in a background on the electronic device.19. The electronic device of claim 11, wherein the instructions furthercause the electronic device to adjust the first location of the one ormore first operation options or the second location of the one or moresecond operation options into the second order in the second menu basedon a time for communicating with a communication object of theapplication.
 20. The electronic device of claim 19, wherein thecommunication object comprises a phone number, an application accountnumber, a mail address, a user identifier, or a user name.